package com.zp.pattern.decorator;

public class Test {
	public static void main(String[] args) {
		//节点流
		Component component = new ComponentImpl();
		//过滤流：用于包装节点流的
		Component component1 = new SubDecorator(component);
		//过滤流
		Component component2 = new SubDecorator2(component1);
		
		component2.doSomething();
		
		//同上
//		Component component = new SubDecorator2(new SubDecorator(new ComponentImpl()));
//		
//		component.doSomething();
		
	}
}
